PV-on-HVM: Fix non-SMP build warning for PV-on-HVM drivers.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 7 Sep 2007 09:18:54 +0000 (10:18 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 7 Sep 2007 09:18:54 +0000 (10:18 +0100)
smp_call_function() compiles to nothing on non-SMP, so we had a
defined-but-not-used static function.

Based on an original patch by:
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Robert Phillips <rphillips@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c

index 33c468d5941ae4355da92370530befd17501d2bb..2c225b76ac583c781455d84e895c3ccae2f569dd 100644 (file)
@@ -18,6 +18,8 @@ struct ap_suspend_info {
  */
 static DEFINE_RWLOCK(suspend_lock);
 
+#ifdef CONFIG_SMP
+
 /*
  * Spinning prevents, for example, APs touching grant table entries while
  * the shared grant table is not mapped into the address space imemdiately
@@ -43,6 +45,14 @@ static void ap_suspend(void *_info)
        atomic_dec(&info->nr_spinning);
 }
 
+#define initiate_ap_suspend(i) smp_call_function(ap_suspend, i, 0, 0)
+
+#else /* !defined(CONFIG_SMP) */
+
+#define initiate_ap_suspend(i) 0
+
+#endif
+
 static int bp_suspend(void)
 {
        int suspend_cancelled;
@@ -80,7 +90,7 @@ int __xen_suspend(int fast_suspend)
 
        nr_cpus = num_online_cpus() - 1;
 
-       err = smp_call_function(ap_suspend, &info, 0, 0);
+       err = initiate_ap_suspend(&info);
        if (err < 0) {
                preempt_enable();
                xenbus_suspend_cancel();